#ifndef _PLANE_H
#define _PLANE_H
#include "global.h"

using namespace std;
typedef pcl::PointXYZ PointT;
extern char mode;
extern char send_data[8];
extern short x, z;
extern float y_min;
extern pcl::PassThrough<PointT> pass_cylinder;    
extern pcl::PassThrough<PointT> pass_plane;                         
extern pcl::VoxelGrid<PointT> sor_plane;
extern pcl::NormalEstimation<PointT, pcl::Normal> ne;
extern pcl::ExtractIndices<PointT> extract;

extern pcl::VoxelGrid<PointT> sor_cylinder;

extern pcl::SACSegmentationFromNormals<PointT, pcl::Normal> seg_cylinder; 
extern pcl::EuclideanClusterExtraction<PointT> ec;

extern pcl::PointCloud<PointT>::Ptr cloud_filtered_cylinder;
extern pcl::search::KdTree<PointT>::Ptr tree_cylinder;

extern pcl::search::KdTree<PointT>::Ptr tmp_tree;

extern pcl::PointCloud<pcl::Normal>::Ptr cloud_normals;
extern pcl::PointCloud<PointT>::Ptr cloud_filtered_plane;
extern pcl::ModelCoefficients::Ptr coefficients_plane;
extern pcl::PointIndices::Ptr inliers_plane;
extern pcl::PointCloud<pcl::PointXYZ>::Ptr all_cloud_cluster_cylinder;
extern pcl::PointCloud<PointT>::Ptr cloud_plane;
extern pcl::PointCloud<PointT>::Ptr cloud_filtered;
extern pcl::console::TicToc tt;	

void findcylinder_run();

#endif     
